package com.hnevc.androiduiclassone10;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.ImageView;
import android.widget.TextView;

import java.io.Serializable;

/**
 * Created by Administrator on 2018/7/4.
 */

public class TeamActivity extends AppCompatActivity {
    protected void onCreate(Bundle savedInstanceState) {
        ImageView ivTupian;
        TextView tvMessage;

        super.onCreate(savedInstanceState);
        setContentView(R.layout.layout_team);
        ivTupian = findViewById(R.id.iv_tupian);
        Intent intent = getIntent();
        Serializable team = intent.getCharSequenceArrayListExtra("team");
        Team team1 = (Team)team;

        switch (team1.getQiudui()){
            case "aodaliya":
                ivTupian.setImageResource(R.drawable.aidaliya);
                break;
            case "agenting":
                ivTupian.setImageResource(R.drawable.agenting);
                break;
            case  "aiji":
                ivTupian.setImageResource(R.drawable.aiji);
                break;
            case "banama":
                ivTupian.setImageResource(R.drawable.banama);
                break;
            case "baxi":
                ivTupian.setImageResource(R.drawable.baxi);
                break;

        }
            tvMessage = findViewById(R.id.tvInfo);
        tvMessage.setText(team1.getMessage());
    }


}
